home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / dev / mui / urltext.lha / Urltext / Sources / mcc / loc.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-25  |  1.1 KB  |  52 lines

  1.  
  2. #include "class.h"
  3.  
  4. /****************************************************************************/
  5. /*
  6.  * Strings definitions
  7.  */
  8.  
  9. #define Msg_Send_STR            "Reach url..."
  10. #define Msg_Copy_STR            "Copy to clipbord"
  11. #define Msg_OpenURLPrefs_STR    "OpenURL prefs..."
  12.  
  13. /****************************************************************************/
  14. /*
  15.  * Code/String array definition
  16.  */
  17.  
  18. struct message
  19. {
  20.     LONG   id;
  21.     STRPTR string;
  22. };
  23.  
  24. struct message messages[] =
  25. {
  26.     Msg_Send,               Msg_Send_STR,
  27.     Msg_Copy,               Msg_Copy_STR,
  28.     Msg_OpenURLPrefs,       Msg_OpenURLPrefs_STR,
  29.  
  30.     NULL
  31. };
  32.  
  33. /****************************************************************************/
  34.  
  35. STRPTR ASM
  36. getString(REG(d0) ULONG id)
  37. {
  38.     register struct message *array;
  39.     register STRPTR         string;
  40.  
  41.     for (array = messages;
  42.          array->string && (array->id!=id);
  43.          array++);
  44.  
  45.     string = array->string;
  46.     if (UrltextBase->cat) string = GetCatalogStr(UrltextBase->cat,id,string);
  47.  
  48.     return string;
  49. }
  50.  
  51. /****************************************************************************/
  52.